/*
 * Copyright (C) 2011 TargetBoard
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package jaxb.wrappers;

import contrl.model.data.users.User;

/**
 * @author amc
 *
 */
public class UserWrapper implements User {
	jaxb.generated.users.User user;

	public UserWrapper(jaxb.generated.users.User user) {
		this.user = user;
	}

	@Override
	public String getEmail() {
		return user.getEmail();
	}

	@Override
	public String getFirsName() {
		return user.getFirsName();
	}

	@Override
	public String getLastName() {
		return user.getLastName();
	}

	@Override
	public String getPassword() {
		return user.getPassword();
	}

	@Override
	public void setEmail(String value) {
		user.setEmail(value);
	}

	@Override
	public void setFirsName(String value) {
		user.setFirsName(value);
	}

	@Override
	public void setLastName(String value) {
		user.setLastName(value);
	}

	@Override
	public void setPassword(String value) {
		user.setPassword(value);
	}

	@Override
	public String getUserName() {
		StringBuilder sb = new StringBuilder(30);
		sb.append(user.getLastName());
		sb.append(" ");
		sb.append(user.getFirsName());
		return sb.toString();
	}

}
